//
//  UIScreen+SDScreen.m
//  SKinDiary
//
//  Created by pcyang on 16/6/26.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import "UIScreen+SDScreen.h"

@implementation UIScreen (SDScreen)
+(CGSize) screenSize
{
    static __strong NSValue* s_sz;
    
    if(nil==s_sz)
    {
        CGSize sz = [UIScreen mainScreen].bounds.size;
        if(sz.height < sz.width)
        {
            CGFloat tmp = sz.height;
            sz.height = sz.width;
            sz.width = tmp;
        }
        
        s_sz = [NSValue valueWithCGSize:sz];
    }
    
    return [s_sz CGSizeValue];
}
@end
